# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-amqp
_pkgname=amqp
pkgver=5.3.1
pkgrel=2
pkgdesc='Low-level AMQP client for Python (fork of amqplib).'
arch=('any')
url='https://pypi.org/project/amqp/#files'
license=('MIT')
depends=('python' 'python-vine')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('4701ee40a6a88738ab2bb199114512af85f722afb99e2ee1d18c48563ceb6f925052315c5ca289e36db5d02aa72412b798442fd6c2f623d10a0ac43af3c2eca8')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

